/*

	CLinuxDevice.h
	
	Implementation of the IDevice interface.
	Graphics device for Linux using SDL and
	OpenGL for window management and rendering.
	
	Written by Sigurd Suhm 2009

*/

#ifndef _CLINUXDEVICE_H
#define _CLINUXDEVICE_H

// Includes
#include "IDevice.h"		// Graphics device interface header

#include <string>			// C++ string class header
#include <SDL/SDL.h>		// SDL header

namespace EraAstral
{
	namespace graphics
	{
		class LinuxDevice : public IDevice
		{
			private:
				// Screen surface
				SDL_Surface *m_screen;
			
				// Running Linux kernel version
				std::string m_linuxKernel;

			public:
				// Default constructor
				LinuxDevice(core::Logger *logger);
				// Default destructor
				~LinuxDevice();
				
				// Begins the frame
				void BeginFrame();
				// Ends the frame and presents to the screen
				void EndFrame();
				
				// Projection methods
				void SetPerspective();
				void SetOrtho();
				
				// Changes the resolution
				void ChangeResolution(unsigned int width, unsigned int height);
				// Toggles full screen mode
				void ToggleFullScreen();
				// Changes the caption of the window
				void SetWindowCaption(const char *caption);
			
				// Toggles grab input
				void ToggleGrabInput();
		};
	}
}

#endif		// _CLINUXDEVICE_H
